<div class="layui-card-body">
    <div class="timo-table-wrap">
        <table class="layui-table timo-table">
            <thead>
            <tr>
                <th class="timo-table-checkbox">
                    <label class="timo-checkbox"><input type="checkbox">
                        <i class="layui-icon layui-icon-ok"></i></label>
                </th>
                <th>项目名称</th>
                <th>所属产品线</th>
                <th>开发分支</th>
                <th>从prod合并状态</th>
                <th>从prod合并时间</th>
                <th>向上合并信息</th>
                <th th:if="${appVersion.published=='0' && (appVersion.co_release_branch=='1' || appVersion.hotfix_flag=='1')}">上次deploy结果</th>
            </tr>
            </thead>
            <tbody>
            <tr th:each="item:${list}">
                <td><label class="timo-checkbox"><input type="checkbox" th:value="${item.id}">
                    <i class="layui-icon layui-icon-ok"></i></label></td>
                <td th:text="${#entity.readField(appMap,item.app_id+'')}+'-'+${#entity.readField(appMap,item.app_id+'_repo')}">项目名称</td>
                <td th:text="${#entity.getProductionTitleByAppId(item.app_id)}">所属产品线</td>
                <td>
                    <select class="timo-search-select layui-input" mo:dict="APP_VERSION_CHECKOUT_STATUS" mo-selected="${item.has_dev}" disabled="disabled"></select>
                </td>
                <td>
                    <select th:style="${item.merge_from_status=='2'?'color:red':''}" class="timo-search-select layui-input" mo:dict="APP_VERSION_MERGE_STATUS" mo-selected="${item.merge_from_status}" disabled="disabled"></select>
                </td>
                <td th:text="${#dates.format(item.merge_from_time,'yyyy-MM-dd HH:mm:ss')}">从prod合并时间</td>
                <td>
                    <select th:style="${item.merge_to_status=='2'?'color:red':''}" class="timo-search-select layui-input" mo:dict="APP_VERSION_MERGE_STATUS" mo-selected="${item.merge_to_status}" disabled="disabled"></select>
                    <span style="margin-left: 1em;" th:text="${#dates.format(item.merge_to_time,'yyyy-MM-dd HH:mm:ss')}">时间</span>
                </td>
                <td th:if="${appVersion.published=='0' && (appVersion.co_release_branch=='1' || appVersion.hotfix_flag=='1')}" th:utext="${item.deploy}">上次打包结果</td>
            </tr>
            </tbody>
        </table>
    </div>
    <div th:replace="/common/fragment :: page"></div>
</div>
<script>
    // 展示数据列表-多选框
    var thcheckbox = $(".timo-table th .timo-checkbox :checkbox");
    thcheckbox.on("change", function () {
        var tdcheckbox = $(".timo-table td .timo-checkbox :checkbox");
        if (thcheckbox.is(":checked")) {
            tdcheckbox.prop("checked", true);
        } else {
            tdcheckbox.prop("checked", false);
        }
    });
</script>